package com.lnking.lnkingplace.mapper;

import com.lnking.lnkingplace.model.dto.user.UserDetailDto;
import com.lnking.lnkingplace.model.dto.user.UserOverviewDto;
import com.lnking.lnkingplace.model.entity.User;
import com.lnking.lnkingplace.model.request.user.UserStreetRequest;
import com.lnking.starter.mybatis.mapper.CustomBaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zxq
 * @since 2022-08-18
 */
public interface UserMapper extends CustomBaseMapper<User> {

    UserDetailDto getDetailById(String id);


    List<UserOverviewDto> AllStreet();

    List<UserOverviewDto> street(UserStreetRequest param);

    @Select(" SELECT DISTINCT place_type FROM place ")
    List<String> getType();

    @Update(" update user set del_flag = 1 where place_id = #{placeId} ")
    void updateDelFlag(String placeId);
}
